widgetfocus: Fix copy/paste error
authorBenjamin Otte <otte@redhat.com>
Tue, 31 Jul 2018 18:58:10 +0000 (20:58 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 31 Jul 2018 20:34:27 +0000 (22:34 +0200)
This lead to erratic focus behavior with <Tab> in hboxes, where the
smallest child got focus first instead of the leftmost child.

gtk/gtkwidgetfocus.c

index 098df4348bac50fa46ed72a10a3f18332c019f7e..ce5519c4c80b75a635eb0c621f479ecd5a18c8c1 100644 (file)
@@ -89,8 +89,8 @@ tab_sort_func (gconstpointer a,
 
   if (y1 == y2)
     {
-      const float x1 = child_bounds1.origin.y + (child_bounds1.size.width / 2.0f);
-      const float x2 = child_bounds2.origin.y + (child_bounds2.size.width / 2.0f);
+      const float x1 = child_bounds1.origin.x + (child_bounds1.size.width / 2.0f);
+      const float x2 = child_bounds2.origin.x + (child_bounds2.size.width / 2.0f);
 
       if (text_direction == GTK_TEXT_DIR_RTL)
         return (x1 < x2) ? 1 : ((x1 == x2) ? 0 : -1);